require 'watir-webdriver'


$LOAD_PATH.unshift(File.dirname(__FILE__)) unless $LOAD_PATH.include?(File.dirname(__FILE__))
require 'login'
require 'system_management'
require 'dns'

module ZDDI
	
	def self.init_browser(browser)
		@ie = case browser
					when "ie"
						Watir::Browser.new:ie
					when "ff"
						Watir::Browser.new:ff
					when "chrome"
						Watir::Browser.new:chrome, :switches => %w[--start-maximized]
					else
						putss "browser doesn't init!"
					end
	end
				
	def self.browser
		@ie 
	end
	
	def init_class(class_name)
		@ic = case class_name
				when "System_management"
					ZDDI::System_management::Server_management.new
				when "Fixed_address"
					ZDDI::DHCP::Fixed_address.new
				when "Host_address"
					ZDDI::DHCP::Host_address.new
				when "Reservation_address"
					ZDDI::DHCP::Reservation_address.new
				when "Address_pool"
					ZDDI::DHCP::Address_pool.new
				when "Zone"
					ZDDI::DNS::ZONE.new
				when "F_S_zone"
					ZDDI::DNS::F_S_zone.new
				when "Cache"
					ZDDI::DNS::Cache.new
				else
					putss "init failed"
				end
	end	
	
	def self.i_class
		@ic
	end
end
